﻿using System;

namespace YArchitech.Temp
{
	public class HYDuctTaper : HYDuctFitting, IComparable, IHYXmlSerial
	{
		public HYDuctTaper()
		{
			base.Name = "侧连接";
		}

		public double Offset { get; set; }

		public int CompareTo(object value)
		{
			if (value is HYDuctTaper)
			{
				return this.CompareTo(value as HYDuctTaper);
			}
			return 1;
		}

		public int CompareTo(HYDuctTaper value)
		{
			return HYDuctTaper.Compare(this, value);
		}

		public static int Compare(HYDuctTaper t1, HYDuctTaper t2)
		{
			if (t1.Offset == t2.Offset)
			{
				return 0;
			}
			if (t1.Offset <= t2.Offset)
			{
				return -1;
			}
			return 1;
		}

		public override void CalCoefficient()
		{
		}
	}
}
